<script type="text/javascript" src = "script/menu.js"></script>
<script type="text/javascript" src = "script/logout.js"></script>
<%@page import="sql.DBManagment"%>
<%@page import="sql.record.*"%>
<%@page import="java.util.*"%>
<%	
	User loginUser = new User();
	loginUser.userName = (String) session.getAttribute("loggedUser");
	User storedUser = new User();
	try  {
		List<User> userList = DBManagment.getRecord(loginUser);
		storedUser = userList.get(0);
 %>
 <script type="text/javascript" src = "script/top_menu_hide.js"></script>
 <%
 	if(storedUser.type.intValue() == 1){
 %>
		<a href="#" title="Manage Courses" id="mng_courses" class="menuLink">Mangage Courses</a>
		<a href="#" title="Manage Users" id="mng_users" class="menuLink">Manage Users</a>
 <%
 	}
 %>
		<a href="#" title="Courses" id="courses" class="menuLink">Courses</a>
		<a href="#" title="My Table" id="mytable" class="menuLink">My Table</a>
		<a href="#" title="My Profile" id="profile" class="menuLink">My Profile</a>
 <%
	}catch(Exception e){
		//no logged user
 %>
 		<script type="text/javascript" src = "script/top_menu_show.js"></script>
		<a href="#" title="Register" id="register" class="menuLink">Resgister</a>
		<a href="#" title="Login" id="login" class="menuLink">Login</a> 
 <%	
	}
 %>